<link rel="stylesheet" href="resources/weui/dist/style/weui.min.css"/>
<div class="container" id="wei_div" style="background-color: white;padding-bottom: 50px;">
	<div class="weipage" style="display: block;margin-bottom: 0px;">

		<?php
		$i=0;
		foreach ($court_rows_array as $item): ?>
		<div >
			<?php
			$j=0;
			foreach ($item as $court):?>

				<div class="item-wei" id="item-wei-<?php echo $i.$j ?>">
					<div style=" width:75%; height:75%;  border-radius:50%;margin:0px auto;
	text-align:center; overflow:hidden;">
						<img src="resources/<?php if(empty($court['pic_location'])){
							echo 'image/city/hangzhou.jpg';
						}else{
							echo $court['pic_location'];
						}?>" style="width: 100%;height:100%"/>
					</div>
					<div><h4><?php echo $court['abbreviation'] ?></h4></div>
				</div>

			<?php
				$j++;
				 endforeach;?>
		</div>
		<?php
			$i++;
			 endforeach;?>
	</div>
</div>

<div class="weui_dialog_alert" id="weui_dialog_alert" style="display: none">
	<div class="weui_mask"></div>
	<div class="weui_dialog">
		<div class="weui_dialog_hd"><strong class="weui_dialog_title">提示</strong></div>
		<div class="weui_dialog_bd" id="dialog_info">
			<span>长按二维码关注公众号</span>
			<?php
			$i=0;
			foreach($court_rows_array as $item):?>
				<?php
				$j=0;
				foreach ($item as $court):?>
					<img src="resources/<?php echo $court['qr_location']?>" style="width: 100%;display: none" id="img-<?php echo $i.$j ?>"/>
				<?php
					$j++;
				endforeach;?>
			<?php
				$i++;
			endforeach;?>
		</div>
		<div class="weui_dialog_ft">
			<a href="javascript:" class="weui_btn_dialog primary" id="dialog_check">确定</a>
		</div>
	</div>
</div>

<!--<script src="resources/js/plugin/hammer.min.js"></script>-->
<script>
	$(document).ready(function(){

		$('.item-wei').css('height',$('.item-wei').css('width'));
		//var lineheight=$('.item-wei').css('width')*0.85;
		var lineheight=$('.item-wei').find('img').css('height');
		$('.item-wei').find('img').css('line-height',lineheight);
		$('.item-wei').click(function(){
			var id=$(this).attr('id');
			var ids=id.split('-');
			var jk=ids[2];
			var img_id='img-'+jk;
			$('#'+img_id).show();
			$('#weui_dialog_alert').show();
		});
		$('#dialog_check').click(function(){
			$('#weui_dialog_alert').hide();
			$('#weui_dialog_alert').find('img').hide();
		});
	})
</script>